<template>
	<view>
		<view class="c-33 fs-32 bold" style="padding: 22rpx 30rpx;">问题反馈</view>
		<view class="fr-s-c" @click="cur = index" v-for="(item,index) in list" :key="index" style="padding: 22rpx 30rpx;">
			<text class="text-line-1 c-33 fs-28 bold flex-1">{{item.title}}</text>
			<image style="width: 38rpx; height: 38rpx;" v-if="cur!=index" :src="$path + '/login/ng.png'" mode=""></image>
			<image style="width: 38rpx; height: 38rpx;" v-else :src="$path + '/login/y.png'" mode=""></image>
		</view>
		<view class="fr-s-c" style="padding: 22rpx 30rpx;">
			<text class="text-line-1 c-33 fs-28 bold flex-1">还想说点</text>
		</view>
		<view class="w-1 p-r-30" >
			<view class="mut fl-s-e p-30">
				<textarea class="w-1 fs-24" style="height: 132rpx;" maxlength="100" v-model="content" disable-default-padding placeholder="最多可输入100字"></textarea>
				<text class="c-77 fs-28">{{content.length}}/100</text>
			</view>
		</view>
		
		
		<view class="iphonex">
			<view class="w-1 p-30">
				<view class="big-btn" style="background: #ff5c55;" @click="sub">确认，下一步</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	const id = ref(0)
	const list = ref([])
	const cur = ref(0)
	onLoad(o=>{
		id.value = o.id 
		getlist()
	})
	function getlist(){
		uni.$post({
			url:'/api/Other/Reasoncancelst',
		}).then(res=>{
			list.value = res.data;
		})
	}
	
	const content = ref('')
	
	function sub(){
		if(cur.value==-1) return uni.$u.toast('请输入取消原因');
		uni.navigateTo({
			url:'./LogOff2?content='+content.value+'&reason='+list.value[cur.value].title
		})
	}
</script>

<style>
.tbox{
	width: 750rpx;
	height: 80rpx;
	background: #FFEFE5;
	border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.mut{
	background: #F3F3F3;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
}
</style>
